//
//  GYStoreHomeFirstHeadView.m
//  GoodLuck
//
//  Created by apple on 2018/3/13.
//  Copyright © 2018年 yunjiazhineng. All rights reserved.
//

#import "GYStoreHomeFirstHeadView.h"

@interface GYStoreHomeFirstHeadView ()

@property (weak, nonatomic) IBOutlet UIButton *favoritesBtu;
@property (weak, nonatomic) IBOutlet UIButton *saleumBtu;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *markLeftMarginCons;

@end
@implementation GYStoreHomeFirstHeadView

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (IBAction)onClick:(UIButton *)sender {
    [UIView animateWithDuration:0.5 animations:^{
        self.markLeftMarginCons.constant = sender.frame.origin.x;
    }];
    self.loadStoreGoodsRankCallBack(sender.tag);
    switch (sender.tag) {
        case 1:
        {
            [self.favoritesBtu setTitleColor:RGBColor(0, 158, 214) forState:UIControlStateNormal];
            [self.saleumBtu setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        }
            break;
            
        case 2:
        {
            [self.favoritesBtu setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
            [self.saleumBtu setTitleColor:RGBColor(0, 158, 214) forState:UIControlStateNormal];
        }
            break;
            
        default:
            break;
    }
}


@end
